package fr.charlott.business.dto;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotEmpty;

public class CategorieDTO {

	private Long id;
	
	@NotNull
	@NotEmpty
	private String nom;

	// constructors

	public CategorieDTO() {
		super();
	}

	public CategorieDTO(String nom) {
		this();
		this.setNom(nom);
	}
	
	// getters - setters
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CategorieDTO other = (CategorieDTO) obj;
		return (id == other.id);
	}
}
